JBoss Community Archive (Read Only)

Teiid 8.3

Data Sources

This examples uses two data sources, a relational database and a CSV text file.  This section will describe how each is being used in this example.

Source: Accounts - H2 Relational Database

The H2 database is used here since it is Open Source, comes with JBoss AS and is light-weight. You can substitute any other relational database, as long as you have a suitable JDBC driver. The schema file provided, " dynamicvdb-datafederation/src/teiidfiles/customer-schema.sql" , is specific to H2.   But it can be easily converted for use with other databases.

Source: Market Data - CSV Text File

In order to use a Text file as the source, we need a data file which defines the data in the table format (i.e, rows and columns)

Each data file contains column information for the table. The column information is typically defined on line 1, as header line in the file, and all the following lines contain the actual rows of data.  Each line corresponds to single row.  A portion of the sample file is shown below. The complete sample file is "dynamicvdb-datafederation/src/teiidfiles/data/marketdata-price.txt".

SYMBOL,PRICE
IBM,83.46
RHT,11.84
BA, 44.58
ORCL,17.37

You can use the provided data files or create your own data files.

When performing the setup steps of the quickstart, it will configure the datasources and preload the H2 database.  

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 12:38:03 UTC, last content change 2013-03-14 16:27:35 UTC.